 package org.hoyi.util;
 
 /**
  *          Author:ellen
  *          Email:ellen@kuaifish.com
  *          CreateDate:2015-05-20
  *          ModifyDate:2015-06-20
  *          hoyi entities @ hoyi.org
  *          使用请在项目关于内标注hoyi版权，
  *          hoyi版权归hoyi.org所有
  */
 public class MethodCutInfo
 {
   public String methodName;
   public String[] params;
   public boolean containparam = false;
 
   public void Calc(String methodTemp)
   {
     methodTemp = methodTemp.replace(" ", "");
     CutStrInfo cstr = new CutStrInfo("(", ")", methodTemp);
     boolean containparam = cstr.Calc(false);
     int endIndex = methodTemp.indexOf("(");
     if(endIndex == -1) {
    	 // 如果没有括号，则处理static 属性
    	 methodName = methodTemp;
    	 if(methodName.endsWith("#")) {
    		 methodName = methodName.substring(0, methodName.length() - 1);
    	 }
    	 params = new String[] {};
     }else {
    	 // 如果有方法，则拿出参数来.
         this.methodName = methodTemp.substring(0, endIndex);
         if (containparam) {
           containparam = cstr.EXPREDContent.length() > 0;
           this.params = cstr.EXPREDContent.split(",");
         }
	}
   }
 }

